<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>관리자관리</title>
	<script src="../js/validator.js" type="text/javascript"></script>
	<script type="text/javascript">
		function reg(frm)
	    {
			if(!checkAuth()) return false;
			if (!isTextValidate(frm.admin_name, "string", 0, "이름"))			return false;
	
			return true;
	    }
        
        function realDel()
        {
			if(!checkAuth()) return;
        	if (confirm("정말로 삭제하시겠습니까?"))
       		{
				var frm = document.forms["deleteFrm"];
				frm.submit();
       		}
        }
    </script>
</head>

<body>
		<!-- 본문 영역 -->
		<div id="contents">
			<!-- 제목 및 Location 영역 -->
			<div id="location">
				<h3>관리자관리</h3>
				<div>홈 &gt; 관리메뉴 &gt; <strong>관리자관리</strong></div>
			</div>

			<!-- 본문 내용 -->
			<div id="content">
				<form name="deleteFrm" method="post" action="../admin/adminmng_proc.do" onsubmit="return reg(this);">
				<input type="hidden" name="mode" value="delete" />
				<input type="hidden" name="sys_id" value="${listMap.SYS_ID}" />
				<input type="hidden" name="admin_id" value="${listMap.ADMIN_ID}" />
				</form>
				<form name="writeFrm" method="post" action="../admin/adminmng_proc.do" onsubmit="return reg(this);">
				<input type="hidden" name="mode" value="edit" />
				<input type="hidden" name="sys_id" value="${listMap.SYS_ID}" />
				<input type="hidden" name="admin_id" value="${listMap.ADMIN_ID}" />
				<div class="ar">
					<span class="button btnProc01"><input type="submit" value="저장" /></span>
					<c:if test="${listMap.ADMIN_GUBUN ne '1'}">
					<span class="button btnProc01"><a href="#" onclick="realDel(); return false;">삭제</a></span>
					</c:if>
					<span class="button btnProc01"><a href="#" onclick="history.go(-1); return false;">취소</a></span>
				</div>
				<input type="hidden" name="mode" value="e" />
				<table cellspacing="0" cellpadding="0" border="0" class="tbl_type04">
					<colgroup>
						<col width="150px" />
						<col />
					</colgroup>
					<tbody>
						<tr>
							<th>아이디</th>
							<td>${listMap.ADMIN_ID}</td>
						</tr>
						<tr>
							<th>비밀번호</th>
							<td><input type="password" name="admin_pw" size="20" />  (영문/숫자/특수문자 조합 20자리 이내)</td>
						</tr>
						<tr>
							<th>비밀번호 확인</th>
							<td><input type="password" name="admin_pw2" size="20" /></td>
						</tr>
						<tr>
							<th>이름</th>
							<td><input type="text" name="admin_name" size="20" maxlength="10" value="${listMap.ADMIN_NAME}" /> (10자리 이내)</td>
						</tr>
						<tr>
							<th>소속</th>
							<td><input type="text" name="admin_part" size="20" maxlength="10" value="${listMap.ADMIN_PART}" /> (10자리 이내)</td>
						</tr>
						<tr>
							<th>직책</th>
							<td><input type="text" name="admin_title" size="20" maxlength="10" value="${listMap.ADMIN_TITLE}" /> (10자리 이내)</td>
						</tr>
						<tr>
							<th>전화번호</th>
							<td><input type="text" name="admin_tel" size="20" maxlength="16" value="${listMap.ADMIN_TEL}" /></td>
						</tr>
					</tbody>
				</table>
				</form>
			</div>
		</div>
</body>
</html>
